:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-size: 16px;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 移动优先的响应式设计 */
@media screen and (min-width: 768px) {
  :root {
    font-size: 16px;
  }
}

@media screen and (min-width: 1024px) {
  :root {
    font-size: 18px;
  }
}

/* 使用rem作为主要的长度单位 */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

/* 响应式容器 */
@media screen and (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media screen and (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media screen and (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
}


/* 响应式网格系统 */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

@media screen and (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media screen and (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

/* 响应式间距 */
.spacing-sm {
  padding: 0.5rem;
}

.spacing-md {
  padding: 1rem;
}

.spacing-lg {
  padding: 1.5rem;
}

@media screen and (min-width: 768px) {
  .spacing-sm {
    padding: 0.75rem;
  }

  .spacing-md {
    padding: 1.5rem;
  }

  .spacing-lg {
    padding: 2rem;
  }
}

